Package excel.newworksheet

Source Code of excel.newworksheet.AsposeNewWorksheet

package excel.newworksheet;

import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.WorksheetCollection;

public class AsposeNewWorksheet
{
  public static void main(String[] args) throws Exception
  {
        //Instantiating a Workbook object
        Workbook workbook = new Workbook();

    //Adding a new worksheet to the Workbook object
    WorksheetCollection worksheets = workbook.getWorksheets();
    Worksheet worksheet = worksheets.add("My Worksheet");

    //Saving the Excel file
        workbook.save("data/newWorksheet_Aspose.xls");
       
        //Print Message
        System.out.println("Sheet added successfully.");
  }
}
TOP

Related Classes of excel.newworksheet.AsposeNewWorksheet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.